var express = require('express');

var upload = require('../utils/uploadPictureConfig')  //导入上传配置
var userModule = require('../models/user')  //导入用户模板
var { registerUserControl,loginUserControl,updateUSerControl,yYControl } = require('../controller/userController')  //导入用户控制层

const Token = require('../utils/jwtutil')   //token

var router = express.Router();  //创建路由对象

/**
 * 登录注册修改接口
 */
router.post('/UserRegister', upload.single('headerImg'),registerUserControl)

router.post('/UserLogin',loginUserControl)

router.post('/UserUpdate',updateUSerControl)

// 用户预约接口
router.post('/yY',yYControl)

// 测试

router.get('/cs',(req,res) => {
    res.send({
        Code: 100,
        Text: '测试'
    })
})
module.exports = router;
